package org.cmg.study.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
 * @author CMG
 * @version 1.0
 * @cLassName MainApp12
 * @description
 * @date 2021/9/1 14:28
 **/
public class MainApp12 {
    static Logger log = LogManager.getLogger(MainApp12.class);

    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
        log.info("Going to create Hello World Obj");
        HelloWorld obj = (HelloWorld) ctx.getBean("helloWorld");
        obj.getMessage();
        log.info("Exiting the program");
    }
}
